#include<bits/stdc++.h>

using namespace std;

//ctype.h
int main() {//字符切换大小写
    char ch;
    cin >> ch;
    if ('A' <= ch && ch <= 'Z') {
        ch += 32;
    } else if ('a' <= ch && ch <= 'z') {
        ch -= 32;
    }
    cout << ch << endl;

}
